﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// BienLaiThu Repository. Good example of CRUD operations.
    ///// </summary>
    public class BienLaiThuRepository : IBienLaiThuRepository
    {
        private static readonly IBienLaiThuDao _bienLaiThu = DataAccess.BienLaiThuDao;
        public List<BienLaiThu> GetList()
        {
          return  _bienLaiThu.GetBienLaiThu().ToList();
        }

        public BienLaiThu Get(string id)
        {
           return _bienLaiThu.GetBienLaiThuByID(id);
        }

        public void Insert(BienLaiThu t)
        {
            _bienLaiThu.InsertBienLaiThu(t);
        }

        public void Update(BienLaiThu t)
        {
            _bienLaiThu.UpdateBienLaiThu(t);
        }

        public void Delete(BienLaiThu t)
        {
            _bienLaiThu.DeleteBienLaiThu(t);
        }

        public List<BienLaiThu> GetBienLaiThuByClassIdAndSchoolSchoolYear(string schoolYearID, int schoolId, string classId)
        {
            return _bienLaiThu.GetBienLaiThuByClassIdAndSchoolSchoolYear(schoolYearID, schoolId, classId);
        }


        public int InsertGetId(BienLaiThu obj)
        {
            return _bienLaiThu.InsertGetId(obj);
        }
    }
}